package cloud.demarcia.rabbitregister.repository;

import cloud.demarcia.rabbitregister.entity.MemberEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface MemberRepository extends CrudRepository<MemberEntity,Integer>, JpaRepository<MemberEntity,Integer> {

    /*------------------查找数量---------------------*/
    int countByEmailAndUsername(String email,String email1);
    int countByEmail(String email);
    int countByUsername(String email);

    /*------------------查找实体类---------------------*/
    String findPasswordByEmailAndUsername(String s,String s1);


    MemberEntity findByEmail(String email);
    MemberEntity findByUsername(String name);

}
